// source --> https://www.inflexmedia.com/wp-content/plugins/chaty/js/cht-front-script.min.js?ver=16655740603.0.1 function launch_chaty(t){(void 0==t||"widget_index"==t)&&(t=1),jQuery("#chaty-widget-_"+t).length&&jQuery("#chaty-widget-_"+t+" .chaty-cta-button .open-chaty").trigger("click")}function close_chaty(){jQuery(".chaty.active .chaty-open").length&&jQuery(".chaty.active .chaty-open").each(function(){jQuery(this).find(".chaty-cta-close").trigger("click")})}!function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery"],t):"undefined"!=typeof module&&module.exports?module.exports=t(require("jquery")):t(jQuery)}(function(t,a){var e,c,n=[],i="",s=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|ipad|iris|kindle|Android|Silk|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(navigator.userAgent)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(navigator.userAgent.substr(0,4))?1:0,o=["System Stack","Arial","Tahoma","Verdana","Helvetica","Times New Roman","Trebuchet MS","Georgia","-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif"],h=!1,l=!1,r=0,d=!1,g=!1,y=[],p=0,m=0,f="",u=0;function v(e){if(a!=t("#chaty-widget-"+e).data("animation")&&"none"!=t("#chaty-widget-"+e).data("animation")){var c="chaty-animation-"+t("#chaty-widget-"+e).data("animation");t("#chaty-widget-"+e+" ."+c).removeClass(c)}}function w(){n.length&&(t.each(n,function(a,e){var c,h="",y="",p=0,m={},f=(c=e,!E(c.triggers.has_countries)||!!z(c.triggers.countries)||!c.triggers.countries.length||"-"==(i=L())||-1!=t.inArray(i,c.triggers.countries));if(f=(f=f&&function t(a){if(a.triggers.has_date_scheduling_rules){var e=a.triggers.date_scheduling_rules.start_date_time,c=a.triggers.date_scheduling_rules.end_date_time,n=new Date,i=(n=q(n,a.triggers.time_diff)).getFullYear()+"-"+W(n.getMonth()+1)+"-"+W(n.getDate())+" "+W(n.getHours())+":"+W(n.getMinutes())+":"+W(n.getSeconds());return""==c&&!!(e<=i)||""==e&&!!(c>=i)||""!=e&&""!=c&&!!(e<=i)&&!!(c>=i)}return!0}(e))&&function t(a){var e=!0;if(E(a.triggers.has_day_hours_scheduling_rules)&&a.triggers.day_hours_scheduling_rules.length>0){var c=a.triggers.day_hours_scheduling_rules;if(c.length>0){e=!1;for(var n=new Date,i=(n=q(n,a.triggers.day_time_diff)).getHours(),s=n.getMinutes(),o=n.getDay(),h=0;h=0&&c[h].days<=6?c[h].days==o&&(d=1):7==c[h].days?o>=0&&o<=4&&(d=1):8==c[h].days?o>=1&&o<=5&&(d=1):9==c[h].days&&(5==o||6==o)&&(d=1),1==d&&(i>c[h].start_hours&&i=c[h].start_min&&(l=1):i>c[h].start_hours&&i==c[h].end_hours?s<=c[h].end_min&&(l=1):i==c[h].start_hours&&i==c[h].end_hours&&s>=c[h].start_min&&s<=c[h].end_min&&(l=1),1==l&&s>=c[h].start_min&&s<=c[h].end_min&&(r=1)),1==l&&1==d&&(e=1),1==e&&(h=c.length+1)}}}return e}(e),t.each(e.channels,function(t,a){b(a)&&(p++,m=a)}),f&&p>0&&!t("#chaty-widget-"+e.id).length){var u,v=B(e.settings);v="right"==v?"right":"left";var w=(u=e,"vertical"!=u.settings.icon_view?"top":"right"==B(u.settings)?"left":"right"),x="";t("body").append(x),E(e.triggers.auto_hide_widget)&&parseInt(e.triggers.hide_after)>0&&(t("#chaty-widget-"+e.id).addClass("auto-hide-chaty"),t("#chaty-widget-"+e.id).attr("data-time",e.triggers.hide_after));var C=D(e.id,"c-widget");if(t("#chaty-widget-"+e.id).addClass(e.settings.show_cta),1==p){"vertical"!=e.settings.icon_view&&(w="right"!=v?"right":"left");var S=k(m,e.id,w);t("#chaty-widget-"+e.id+" .chaty-i-trigger").html(S),t("#chaty-widget-"+e.id+" .chaty-i-trigger").addClass("single-channel"),t("#chaty-widget-"+e.id+" .chaty-i-trigger .chaty-channel").addClass("single"),t("#chaty-widget-"+e.id+" .chaty-widget").addClass("has-single");var j=e.settings.cta_text;z(j)||(j=$(j)),"first_click"==e.settings.show_cta&&(C?(t("#chaty-widget-"+e.id+" .chaty-tooltip").removeClass("chaty-tooltip"),t("#chaty-widget-"+e.id+" .chaty-i-trigger .chaty-channel").addClass("active").addClass("chaty-tooltip").addClass("pos-"+w),t("#chaty-widget-"+e.id+" .chaty-i-trigger .chaty-channel").append(""+j+"").addClass("active").addClass("has-on-hover"),t("#chaty-widget-"+e.id+" .chaty-i-trigger .chaty-channel a").append(""+j+"").addClass("has-on-hover")):t("#chaty-widget-"+e.id+" .chaty-i-trigger .chaty-channel a").append(""+j+"").removeClass("active").addClass("has-on-hover")),"all_time"==e.settings.show_cta&&t("#chaty-widget-"+e.id+" .chaty-i-trigger .chaty-tooltip").append(""+j+"").addClass("active").addClass("has-on-hover");var M=m;("Instagram"!=M.channel_type||"#ffffff"!=M.icon_color&&"#fff"!=M.icon_color)&&(h+="#chaty-widget-"+e.id+" ."+M.channel_type+"-channel .color-element{ fill: "+M.icon_color+"; color: "+M.icon_color+";}",h+="#chaty-widget-"+e.id+" .channel-icon-"+M.channel_type+" .color-element{ fill: "+M.icon_color+"; color: "+M.icon_color+";}"),h+="#chaty-widget-"+e.id+" ."+M.channel_type+"-channel .chaty-custom-icon { background-color: "+M.icon_color+"; }",h+="#chaty-widget-"+e.id+" ."+M.channel_type+"-channel .chaty-svg { background-color: "+M.icon_color+";}",h+="#chaty-widget-"+e.id+" .channel-icon-"+M.channel_type+" .chaty-svg { background-color: "+M.icon_color+";}","Contact_Us"==M.channel_type&&(h+=".chaty-contact-form-box #chaty-submit-button-"+e.id+" {background-color: "+M.contact_form_settings.button_bg_color+"; color: "+M.contact_form_settings.button_text_color+";} ")}else{t.each(e.channels,function(a,c){if(b(c)){I(c.channel_type)&&(c.channel_type=c.channel);var n=k(c,e.id,w);t("#chaty-widget-"+e.id+" .chaty-channel-list").append(n),("Instagram"!=c.channel_type||"#ffffff"!=c.icon_color&&"#fff"!=c.icon_color)&&(h+="#chaty-widget-"+e.id+" ."+c.channel_type+"-channel .color-element{ fill: "+c.icon_color+"; color: "+c.icon_color+";}",h+="#chaty-widget-"+e.id+" .channel-icon-"+c.channel_type+" .color-element{ fill: "+c.icon_color+"; color: "+c.icon_color+";}"),h+="#chaty-widget-"+e.id+" ."+c.channel_type+"-channel .chaty-custom-icon { background-color: "+c.icon_color+"; }",h+="#chaty-widget-"+e.id+" ."+c.channel_type+"-channel .chaty-svg { background-color: "+c.icon_color+";}",h+="#chaty-widget-"+e.id+" .channel-icon-"+c.channel_type+" .chaty-svg { background-color: "+c.icon_color+";}","Contact_Us"==c.channel_type&&(h+=".chaty-contact-form-box #chaty-submit-button-"+e.id+" {background-color: "+c.contact_form_settings.button_bg_color+"; color: "+c.contact_form_settings.button_text_color+";} ")}});var F,T,A=(F=e.settings,T=e.id,(""==F.widget_icon?F.widget_icon="chat-base":"chat-image"==F.widget_icon&&z(F.widget_icon_url)&&(F.widget_icon="chat-base"),"chat-image"==F.widget_icon)?"Chaty Widget":''+function t(a,e){switch(a){case"chat-smile":return'';case"chat-bubble":return'';case"chat-db":return'';default:return''}}(F.widget_icon,F.widget_color)+""),j=e.settings.cta_text;"first_click"!=e.settings.show_cta||C||(j="");var U=w;"horizontal"==e.settings.icon_view&&(U="left"==v?"right":"left"),z(j)||(j=$(j));var O='
'+j+'
';t("#chaty-widget-"+e.id+" .chaty-i-trigger").html(O);var H='
';t("#chaty-widget-"+e.id+" .chaty-i-trigger").append(H)}var N,G,V,R,C=D(e.id,"c-widget");C&&("open"!=e.settings.default_state||1==p)&&(N=e.settings,D(G=e.id,"c-widget")&&E(N.is_pending_mesg_enabled)&&parseInt(N.pending_mesg_count)>0&&(t("#chaty-widget-"+G+" .chaty-widget").hasClass("has-single")?"sheen"==N.attention_effect||"spin"==N.attention_effect||"pulse"==N.attention_effect?t("#chaty-widget-"+G+" .chaty-i-trigger .chaty-channel").append(""+N.pending_mesg_count+""):t("#chaty-widget-"+G+" .chaty-i-trigger .chaty-channel .chaty-svg").append(""+N.pending_mesg_count+""):"jump"==N.attention_effect||"waggle"==N.attention_effect||"blink"==N.attention_effect||"pulse-icon"==N.attention_effect?t("#chaty-widget-"+G+" .chaty-i-trigger .chaty-cta-main .chaty-cta-button").append(""+N.pending_mesg_count+""):t("#chaty-widget-"+G+" .chaty-i-trigger .chaty-cta-main").append(""+N.pending_mesg_count+"")),V=e.settings,D(R=e.id,"c-widget")&&"none"!=V.attention_effect&&""!=V.attention_effect&&(t("#chaty-widget-"+R).attr("data-animation",V.attention_effect),t("#chaty-widget-"+R+" .chaty-widget").hasClass("has-single")?t("#chaty-widget-"+R+" .chaty-i-trigger .chaty-channel .chaty-svg").addClass("chaty-animation-"+V.attention_effect):t("#chaty-widget-"+R+" .chaty-i-trigger .chaty-cta-main .chaty-cta-button").addClass("chaty-animation-"+V.attention_effect)));var X,Y,J=0;"open"!=e.settings.default_state||E(e.settings.show_close_button)||(t("#chaty-widget-"+e.id+" .chaty-widget").addClass("chaty-no-close-button").addClass("chaty-open"),J=1),E(e.settings.is_google_analytics_enabled)&&(t("#chaty-widget-"+e.id+" .chaty-channel-list .chaty-channel").addClass("has-gae"),t("#chaty-widget-"+e.id+" .chaty-i-trigger.single-channel .chaty-channel").addClass("has-gae"),t(".chaty-outer-forms.chaty-whatsapp-form.chaty-form-"+e.id+" form.add-analytics").addClass("form-google-analytics")),E(e.settings.has_custom_css)&&!z(e.settings.custom_css)&&(y+=e.settings.custom_css),"hover"==e.settings.default_state?t("#chaty-widget-"+e.id).addClass("open-on-hover"):"open"==e.settings.default_state&&(t("#chaty-widget-"+e.id+" .chaty-widget").addClass("default-open"),(C||!E(e.settings.show_close_button))&&t("#chaty-widget-"+e.id+" .chaty-widget").addClass("chaty-open"));var Z=(X=e.settings.widget_size,Y=e.settings.custom_widget_size,X);if(Z=parseInt(Z),h+="#chaty-widget-"+e.id+" .chaty-channel {width: "+Z+"px; height: "+Z+"px; }",h+="#chaty-widget-"+e.id+" .chaty-channel > a {width: "+Z+"px; height: "+Z+"px; }",h+="#chaty-widget-"+e.id+" .chaty-channel > a .chaty-custom-icon {display:block; width: "+Z+"px; height: "+Z+"px; line-height: "+Z+"px; font-size: "+parseInt(Z/2)+"px; }",h+="#chaty-widget-"+e.id+" .chaty-channel button {width: "+Z+"px; height: "+Z+"px; margin: 0; padding:0; outline: none; border-radius: 50%;}",h+="#chaty-widget-"+e.id+" .chaty-channel .chaty-svg {width: "+Z+"px; height: "+Z+"px; }",h+="#chaty-widget-"+e.id+" .chaty-channel .chaty-svg img {width: "+Z+"px; height: "+Z+"px; }",h+="#chaty-widget-"+e.id+" .chaty-channel span.chaty-icon {width: "+Z+"px; height: "+Z+"px; }",h+="#chaty-widget-"+e.id+" .chaty-channel a {width: "+Z+"px; height: "+Z+"px; }",h+="#chaty-widget-"+e.id+" .chaty-channel .chaty-svg .chaty-custom-channel-icon {width: "+Z+"px; height: "+Z+"px; line-height: "+Z+"px; display: block; font-size:"+parseInt(Z/2)+"px; }",h+="#chaty-widget-"+e.id+" .chaty-i-trigger .chaty-cta-button {background-color: "+e.settings.widget_color+"; }",h+="#chaty-widget-"+e.id+" .chaty-i-trigger .chaty-cta-button button {background-color: "+e.settings.widget_color+"; }",h+="#chaty-widget-"+e.id+" .chaty-i-trigger .ch-pending-msg {background-color: "+e.settings.pending_mesg_count_bgcolor+"; color: "+e.settings.pending_mesg_count_color+"; }","vertical"==e.settings.icon_view){h+="#chaty-widget-"+e.id+" .chaty-channel-list {height: "+p*(Z+8)+"px; }",h+="#chaty-widget-"+e.id+" .chaty-channel-list {width: "+(Z+8)+"px; }";for(var Q=0;Q<=p;Q++)h+="#chaty-widget-"+e.id+" .chaty-open .chaty-channel-list .chaty-channel:nth-child("+(Q+1)+") {-webkit-transform: translateY(-"+(Z+8)*(p-Q-J)+"px); transform: translateY(-"+(Z+8)*(p-Q-J)+"px);}"}else{t("#chaty-widget-"+e.id+" .chaty-widget").addClass("hor-mode"),h+="#chaty-widget-"+e.id+" .chaty-channel-list {width: "+p*(Z+8)+"px; }",h+="#chaty-widget-"+e.id+" .chaty-channel-list {height: "+Z+"px; }";for(var Q=0;Q<=p;Q++)h+="#chaty-widget-"+e.id+" .chaty-widget.left-position.hor-mode.chaty-open .chaty-channel-list .chaty-channel:nth-child("+(Q+1)+") {-webkit-transform: translateX("+(Z+8)*(p-Q-J)+"px); transform: translateX("+(Z+8)*(p-Q-J)+"px);}",h+="#chaty-widget-"+e.id+" .chaty-widget.right-position.hor-mode.chaty-open .chaty-channel-list .chaty-channel:nth-child("+(Q+1)+") {-webkit-transform: translateX(-"+(Z+8)*(p-Q-J)+"px); transform: translateX(-"+(Z+8)*(p-Q-J)+"px);}"}var K=e.settings.bottom_spacing,tt=e.settings.side_spacing;h+="#chaty-widget-"+e.id+" .chaty-widget {bottom: "+K+"px}","left"==v?(h+="#chaty-widget-"+e.id+" .chaty-widget {left: "+tt+"px; right: auto;}",h+=".chaty-outer-forms.pos-left.chaty-form-"+e.id+" {left: "+tt+"px}",t(".chaty-form-"+e.id).addClass("pos-left")):(h+="#chaty-widget-"+e.id+" .chaty-widget {right: "+tt+"px; left:auto;}",t(".chaty-form-"+e.id).addClass("pos-right"),h+=".chaty-outer-forms.pos-right.chaty-form-"+e.id+" {right: "+tt+"px; left:auto;}"),t(".chaty-form-"+e.id).show();var ta=Z+15+parseInt(K);h+=".chaty-outer-forms.active.chaty-form-"+e.id+" {-webkit-transform: translateY(-"+ta+"px); transform: translateY(-"+ta+"px)} ",h+="#chaty-widget-"+e.id+" .chaty-tooltip:after {background-color: "+e.settings.cta_bg_color+"; color: "+e.settings.cta_text_color+"}",h+="#chaty-widget-"+e.id+" .chaty-tooltip.pos-top:before {border-top-color: "+e.settings.cta_bg_color+"; }",h+="#chaty-widget-"+e.id+" .chaty-tooltip.pos-left:before {border-left-color: "+e.settings.cta_bg_color+"; }",h+="#chaty-widget-"+e.id+" .chaty-tooltip.pos-right:before {border-right-color: "+e.settings.cta_bg_color+";}",h+="#chaty-widget-"+e.id+" .on-hover-text {background-color: "+e.settings.cta_bg_color+"; color: "+e.settings.cta_text_color+"}",h+="#chaty-widget-"+e.id+" .chaty-tooltip.pos-top .on-hover-text:before {border-top-color: "+e.settings.cta_bg_color+"; }",h+="#chaty-widget-"+e.id+" .chaty-tooltip.pos-left .on-hover-text:before {border-left-color: "+e.settings.cta_bg_color+"; }",h+="#chaty-widget-"+e.id+" .chaty-tooltip.pos-right .on-hover-text:before {border-right-color: "+e.settings.cta_bg_color+";}";var te=ta+72+Z;te>0&&(h+=".chaty-outer-forms.chaty-form-"+e.id+" .chaty-agent-body {max-height: calc(100vh - "+te+"px); overflow-y: auto; } ");var tc=ta+72+Z;tc>0&&(h+=".chaty-outer-forms.chaty-whatsapp-form.chaty-form-"+e.id+" .chaty-whatsapp-content {max-height: calc(100vh - "+tc+"px); overflow-y: auto; } ");var tn=ta+82+Z;if(tn>0&&(h+=".chaty-outer-forms.chaty-contact-form-box.chaty-form-"+e.id+" .chaty-contact-inputs {max-height: calc(100vh - "+tn+"px); overflow-y: auto; } "),(25!=K||25!=tt)&&(t(".chaty-outer-forms.chaty-form-"+e.id).addClass("custom-cht-pos"),t("#chaty-widget-"+e.id).addClass("has-custom-pos")),D(e.id,"v-widget")&&(E(e.triggers.exit_intent)||E(e.triggers.has_time_delay)&&parseInt(e.triggers.time_delay)>0||E(e.triggers.has_display_after_page_scroll)&&parseInt(e.triggers.display_after_page_scroll)>0)?(E(e.triggers.has_time_delay)&&parseInt(e.triggers.time_delay)>0&&(l=!0,parseInt(e.triggers.time_delay)>r&&(r=e.triggers.time_delay),t("#chaty-widget-"+e.id).addClass("on-chaty-delay"),t("#chaty-widget-"+e.id).addClass("delay-time-"+parseInt(e.triggers.time_delay)),t("#chaty-widget-"+e.id).attr("data-time",parseInt(e.triggers.time_delay))),E(e.triggers.has_display_after_page_scroll)&&parseInt(e.triggers.display_after_page_scroll)>0&&(d=!0,t("#chaty-widget-"+e.id).addClass("on-chaty-scroll"),t("#chaty-widget-"+e.id).addClass("page-scroll-"+parseInt(e.triggers.display_after_page_scroll)),t("#chaty-widget-"+e.id).attr("data-scroll",parseInt(e.triggers.display_after_page_scroll))),E(e.triggers.exit_intent)&&(g=!0,t("#chaty-widget-"+e.id).addClass("on-chaty-exit-intent"))):(_(e.id),t("#chaty-widget-"+e.id).addClass("active")),!z(e.settings.font_family)&&"none"!=e.settings.font_family){var ti=e.settings.font_family;-1!=t.inArray(ti,o)?"System Stack"==ti&&(ti="-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif"):(t("head").append(''),t("head").append('')),h+="#chaty-widget-"+e.id+", #chaty-widget-"+e.id+" .chaty-tooltip:after {font-family: "+ti+"}"}}g&&void(s?function a(){if(window.history&&window.history.pushState&&g){function e(){g&&""!==location.hash.split("#!/")[1]&&""===window.location.hash&&P()}var c=100;window.history.state&&window.history.state.page&&(c=window.history.state.page),window.history.pushState({page:c+1},""),window.history.pushState({page:c+2},""),window.onpopstate=function(){e()},window.history.onpopstate=function(){e()},window.addEventListener("popstate",function(){e()}),document.addEventListener("backbutton",function(){e()}),window.addEventListener("backbutton",function(){e()}),t(window).on("popstate",function(){e()})}}():t(document).mouseleave(function(t){var a,e,c="mouseout";a=document,e=function(t){null==t.toElement&&null==t.relatedTarget&&P()},a.addEventListener?(a.addEventListener(c,e,!1),P()):a.attachEvent&&a.attachEvent("on"+c,e)})),""!=h&&(t("#custom-chaty-css").length||t("head").append(""),t("#custom-chaty-css").append(h)),""!=y&&(t("#custom-advance-chaty-css").length||t("head").append(""),t("#custom-advance-chaty-css").append(y)),n.length}),t("#custom-advance-chaty-css").length||t("head").append(""),t("#custom-advance-chaty-css").append(f)),t(".chaty-tooltip").each(function(){""==t(this).data("hover")&&t(this).removeClass("left").removeClass("right").removeClass("top").removeClass("chaty-tooltip")}),t(".chaty.auto-hide-chaty").length&&(c=setInterval(function(){var a=++u;if(t(".chaty.auto-hide-chaty.hide-after-"+u).length){var e=t(".chaty.auto-hide-chaty.hide-after-"+a).data("id");t(".chaty-form-"+e).removeClass("active"),t(".chaty.auto-hide-chaty.hide-after-"+a).removeClass("active"),t("#chaty-widget-0"+e).removeClass("auto-hide-chaty")}0==t(".chaty.auto-hide-chaty").length&&clearInterval(c)},1e3)),l&&(e=setInterval(function(){if(t(".chaty.delay-time-"+ ++p).length){var a=t(".chaty.delay-time-"+p).data("id");U(a)}},1e3)),d&&(t(window).on("scroll",function(){if(d){var a=t(document).height()-t(window).height(),e=t(window).scrollTop();if(0!=a){var c=parseInt(e/a*100);if(m<=c){var n=m;m=c;for(var i=n;i<=c;i++)-1==t.inArray(i,y)&&t(".chaty.on-chaty-scroll.page-scroll-"+i).length&&t(".chaty.on-chaty-scroll.page-scroll-"+i).each(function(){var a=t(this).data("id");t(this).removeClass("on-chaty-scroll"),U(a)});m=c}}}}),window.innerWidth,document.documentElement.clientWidth)}function $(t){return new DOMParser().parseFromString(t,"text/html").documentElement.textContent}function b(t){if(E(t.is_agent)){if(t.agent_data.length&&(!s&&E(t.is_agent_desktop)||s&&E(t.is_agent_mobile)))return!0}else if((!s&&E(t.is_desktop)||s&&E(t.is_mobile))&&(""!=t.value||"Contact_Us"==t.channel))return!0;return!1}function _(a){if(t("#chaty-widget-"+a+" .chaty-channel.chaty-default-open").length){var e=t("#chaty-widget-"+a+" .chaty-channel.chaty-default-open a.chaty-whatsapp-form").data("form");if(!z(e)&&D(a,"c-"+t("#chaty-widget-"+a+" .chaty-channel.chaty-default-open").data("channel"))&&(t("#"+e).addClass("is-active"),t("#"+e).length)){var c=t("#chaty-widget-"+a+" .chaty-channel.chaty-default-open a.chaty-whatsapp-form").html();if(v(a),t("#chaty-widget-"+a).find(".ch-pending-msg").remove(),t("#chaty-widget-"+a+" .chaty-widget").removeClass("chaty-open"),t("#chaty-widget-"+a).addClass("form-open"),t("#"+e).addClass("active"),t("#chaty-widget-"+a+" .open-chaty-channel").html(c),t("#chaty-widget-"+a).addClass("active"),t("#chaty-widget-"+a).addClass("active"),t("#chaty-widget-"+a).hasClass("auto-hide-chaty")){var i=parseInt(t("#chaty-widget-"+a).data("time"));i>0&&(i+=u,t("#chaty-widget-"+a).addClass("hide-after-"+i))}if("on"==chaty_settings.data_analytics_settings){var o=[],l=t("#chaty-widget-"+a+" .chaty-channel.chaty-default-open").data("channel"),r=D(a,"v-"+l);if(r&&void 0!==l&&(O(a,"v-"+l),o.push(l)),!h&&o.length){var d=t("#chaty-widget-"+a).data("nonce");t.ajax({url:chaty_settings.ajax_url,data:{widgetId:a,channels:o,userId:a,isMobile:s,widgetNonce:d,action:"update_chaty_channel_views"},type:"post",success:function(t){},error:function(t,a,e){monitorErrorLog(t,a,e)}})}}return}}if(t("#chaty-widget-"+a).addClass("active"),t("#chaty-widget-"+a).hasClass("auto-hide-chaty")){var i=parseInt(t("#chaty-widget-"+a).data("time"));i>0&&(i+=u,t("#chaty-widget-"+a).addClass("hide-after-"+i))}var g=D(a,"v-widget");if(g){O(a,"v-widget"),t("#chaty-widget-"+a).data("user");var l,o=[],y=0,p=0;n[t("#chaty-widget-"+a).data("key")];var m=N("activechatyWidgets");if(null!=m?(m=m.split(","),-1==t.inArray(a,m)&&(m.push(a),H("activechatyWidgets",m=m.join(","),1))):(m=a,H("activechatyWidgets",m,1)),t("#chaty-widget-"+a+" .chaty-widget").hasClass("has-single")){y=1,l=t("#chaty-widget-"+a+" .chaty-channel").data("channel");var r=D(a,"v-"+l);r&&void 0!==l&&(O(a,"v-"+l),o.push(l))}else t("#chaty-widget-"+a+" .chaty-widget").hasClass("chaty-open")&&(p=1,t("#chaty-widget-"+a+" .chaty-channel-list .chaty-channel").each(function(){l=t(this).data("channel"),D(a,"v-"+l)&&void 0!==l&&(O(a,"v-"+l),o.push(l))}));if(g&&!h){var d=t("#chaty-widget-"+a).data("nonce");h||t.ajax({url:chaty_settings.ajax_url,data:{widgetId:a,channels:o,userId:a,isMobile:s,isOpen:p,isSingle:y,widgetNonce:d,action:"update_chaty_widget_views"},type:"post",success:function(t){},error:function(t,a,e){monitorErrorLog(t,a,e)}})}}}function x(a){var e=t("#chaty-widget-"+a).data("user");chatySaasCheckCookie("triggeredFor"+e)||H("triggeredFor"+e,a,2)}function C(t,a){return t}function k(a,e,c){var n="";if(E(a.is_agent)){if(a.agent_data.length){var i=0,o=[];if(t.each(a.agent_data,function(t,a){""!=a.value&&(i++,o=a)}),i>0){var h,l,r,d,g,y,p=T(e);return null==p&&(p=-1),r=a,d=e,g="",null==(y=T(d))&&(y=-1),g+="",f+=".chaty-agent-header.agent-info-"+d+"-"+r.channel+" { background-color: "+r.header_bg_color+"; color: "+r.header_text_color+" } ",f+=".agent-info-"+d+"-"+r.channel+" .chaty-close-agent-list svg { fill: "+r.header_text_color+" } ",t("body").append(g),h=A(a,e),l=F(a,h,c,e),("Instagram"!=a.channel||"#ffffff"!=a.icon_color&&"#fff"!=a.icon_color)&&(f+=".chaty-agent-"+e+"-"+a.channel+" .color-element {fill: "+a.icon_color+"; color: "+a.icon_color+";}"),f+=".chaty-agent-"+e+"-"+a.channel+" .chaty-custom-icon { background-color: "+a.icon_color+";}",f+=".chaty-agent-"+e+"-"+a.channel+" .chaty-svg-img { background-color: "+a.icon_color+";}","
"+l+"
"}}}else{I(a.channel_type)&&(a.channel_type=a.channel);var h=A(a,e),l=F(a,h,c,e);return"Contact_Us"==a.channel_type?n+=" has-chaty-box chaty-contact-form":"Whatsapp"==a.channel_type&&E(a.has_welcome_message)&&!z(a.chat_welcome_message)&&E(a.is_default_open)&&D(e,"c-"+a.channel_type)&&(n+=" chaty-default-open"),"
"+l+"
"}}function S(a,e,c,n,i){var o=e.value,h="_blank";if("Whatsapp"==a.channel_type){var l=j(e.value);s?(h="",o="https://wa.me/"+l):(h="_blank",o="https://web.whatsapp.com/send?phone="+l)}else"WeChat"==a.channel_type?(h="",o="javascript:;"):"Email"==a.channel_type?(h="",o="mailto:"+e.value):"Facebook_Messenger"==a.channel_type?h=s?"":"_blank":"SMS"==a.channel_type?(h="",o="sms:"+e.value):"Telegram"==a.channel_type?(o="https://telegram.me/"+(o=M(e.value,"@")),h="_blank"):"Twitter"==a.channel_type?o="https://twitter.com/"+t.trim(e.value):"Phone"==a.channel_type?(h="",o="tel:"+t.trim(e.value)):"Skype"==a.channel_type?(h="",o="skype:"+t.trim(e.value)+"?chat"):"Snapchat"==a.channel_type?o="https://www.snapchat.com/add/"+t.trim(e.value):"Vkontakte"==a.channel_type?o="https://vk.me/"+t.trim(e.value):"Linkedin"==a.channel_type?o="personal"==e.link_type?"https://www.linkedin.com/in/"+t.trim(e.value):"https://www.linkedin.com/company/"+t.trim(e.value):"Viber"==a.channel_type?(isNaN(o=M(e.value,"+"))||(o=o.replace("+",""),navigator.userAgent.match(/(iPod|iPhone|iPad)/)&&(o="+"+o),o="viber://chat?number="+o),h=""):"TikTok"==a.channel_type&&(o="https://www.tiktok.com/@"+(o=M(t.trim(e.value),"@")),h="");return""+n+""}function j(t){return t=(t=(t=(t=M(t,"+")).replace(/ /g,"")).replace(/-/g,"")).replace(/_/g,"")}function M(a,e){for(a=t.trim(a);a.charAt(0)==e;)a=a.substring(1);for(;a.charAt(a.length-1)==e;)a=a.substring(0,a.length-1);return a}function F(a,e,c,n){var i,o,h,l,r,d,g,y,p="";if(E(a.is_agent))a.url="javascript:;",a.target="";else if("Whatsapp"==a.channel_type){if(E(a.has_welcome_message)&&!z(a.chat_welcome_message))a.url="javascript:;",a.target="",p+=" has-chaty-box chaty-whatsapp-form",function a(e,c){var n="",i=T(c);null==i&&(i=-1);var o="https://web.whatsapp.com/send",h="";if(s?o="https://wa.me/"+e.value:(o=E(e.is_use_web_version)?"https://web.whatsapp.com/send":"https://wa.me/"+e.value,h="_blank"),n+="",t("body").append(n),t("#chaty-form-"+c+"-"+e.channel_type+" .chaty-whatsapp-message").html(e.chat_welcome_message),!z(e.pre_set_message)){var l=e.pre_set_message,r=t("title").text();l=(l=z(r)?l.replace(/{title}/g,""):l.replace(/{title}/g,r)).replace(/{url}/g,window.location),t("#chaty-form-"+c+"-"+e.channel_type+" .csass-whatsapp-input").val(l)}t("#chaty-form-"+c+"-"+e.channel_type).show()}(a,n);else{var m="";if(!z(a.pre_set_message)){m=decodeURI(a.pre_set_message);var f=t("title").text();m=(m=z(f)?m.replace(/{title}/g,""):m.replace(/{title}/g,f)).replace(/{url}/g,window.location),m=encodeURIComponent(m)}s?(a.target="",a.url="https://wa.me/"+a.value+"?text="+m):(a.target="_blank",E(a.is_use_web_version)?a.url="https://wa.me/"+a.value+"?text="+m:a.url="https://web.whatsapp.com/?phone="+a.value+"&text="+m)}}else if("WeChat"==a.channel_type){z(a.qr_code_image_url)||(i=a,h="",null==(l=T(o=n))&&(l=-1),h+="",t("body").append(h),a.url="javascript:;",a.target="",p+=" has-chaty-box chaty-qr-code-form")}else if("Contact_Us"==a.channel_type){r=a,g="",null==(y=T(d=n))&&(y=-1),g+="",t("body").append(g),a.url="javascript:;",a.target="",p+=" has-chaty-box chaty-contact-us-form"}else if("Email"==a.channel_type){if(!z(a.mail_subject)){var u=decodeURI(a.mail_subject),f=t("title").text();u=(u=z(f)?u.replace(/{title}/g,""):u.replace(/{title}/g,f)).replace(/{url}/g,window.location),u=encodeURIComponent(u),a.url+="?subject="+u}}else"Viber"==a.channel_type?(a.value=M(a.value,"+"),s&&!isNaN(a.value)&&navigator.userAgent.match(/(iPod|iPhone|iPad)/)&&(a.value="+"+a.value),a.url="viber://chat?number="+a.value,a.target=""):"Vkontakte"==a.channel_type&&(a.url="https://vk.me/"+t.trim(a.value));var v="";return z(a.click_event)||(v='onclick="'+a.click_event+'"',a.target="",a.url="javascript:;"),""+e+""}function $(t){return new DOMParser().parseFromString(t,"text/html").documentElement.textContent}function T(a){var e=null;return n.length&&t.each(n,function(t,c){c.id==a&&(e=t)}),e}function z(a){return null==a||""==a||""==t.trim(a)}function A(t){return""!=t.custom_image_url&&"null"!=t.custom_image_url?""+t.hover_text+"":""+t.svg_icon+""}function I(a){return""==a||""==t.trim(a)||null==a||"null"==a}function B(t){return"custom"==t.position?t.custom_position:t.position}function P(){g&&t(".on-chaty-exit-intent").length&&t(".on-chaty-exit-intent").each(function(){var a=t(this).data("id");t(this).removeClass("on-chaty-exit-intent"),U(a),t("#chaty-widget-"+a+" .chaty-widget").append("
"),setTimeout(function(){t(".chaty-exit-intent").addClass("animate"),setTimeout(function(){t(".chaty-exit-intent").removeClass("animate")},2500)},500)})}function U(a){_(a),t(".chaty-widget-"+a).removeClass("on-chaty-delay"),t(".chaty-widget-"+a).removeClass("on-chaty-exit-intent"),t(".chaty-widget-"+a).removeClass("on-chaty-scroll"),t(".chaty.on-chaty-delay").length||(clearInterval(e),l=!1),t(".chaty.on-chaty-exit-intent").length||(g=!1),t(".chaty.on-chaty-scroll").length||(d=!1)}function W(t){for(t=t.toString();t.length<2;)t="0"+t;return t}function E(t){return"1"==t||1==t||!0==t||"true"==t||"yes"==t||"on"==t}function q(t,a){if(isNaN(a)){var e=new Date(t.toLocaleString("en-US",{timeZone:a})),c=t.getTime()-e.getTime();return new Date(t.getTime()-c)}var n=new Date;if(n=n.toLocaleString("en-US",{timeZone:"UTC"}),n=new Date(n),-1!=a.indexOf("+")){var i=a.replace("+",""),s=parseInt(i),o=60*parseFloat(i%s);(o=n.getUTCMinutes()+o)>59&&(s+=parseInt(o/60),o%=60),n.setUTCHours(n.getUTCHours()+s,o)}else if(-1!=a.indexOf("-")){var i=a.replace("-",""),s=parseInt(i),o=60*parseFloat(i%s);(o=n.getUTCMinutes()-o)<0&&(s-=parseInt(o/60),o%=60),n.setUTCHours(n.getUTCHours()-s,-o)}var c=t.getTime()-n.getTime();return new Date(t.getTime()-c)}function L(){return i="","undefined"!=typeof Storage&&null!=window.sessionStorage.getItem("chaty_user_country_code")?i=window.sessionStorage.getItem("chaty_user_country_code"):G("chaty_user_country_code")&&(i=N("chaty_user_country_code")),i}function O(t,a){var e=N("chatyWidget_"+t),c=[];null!=e&&""!=e&&(c=JSON.parse(e));var n=!1;if(c.length>0)for(var i=0;i0){for(var i=0;i=2))return!1}return!0}function H(t,a,e){var c=new Date;c.setTime(c.getTime()+864e5*e);var n="expires="+c.toUTCString();document.cookie=t+"="+a+"; "+n+"; path=/; SameSite=Lax"}function N(t){for(var t=t+"=",a=document.cookie.split(";"),e=0;e1&&(e=e[1])&&(""==(e=e.toUpperCase())&&(e="-"),a=e,"undefined"!=typeof Storage?null==window.sessionStorage.getItem("chaty_user_country_code")&&window.sessionStorage.setItem("chaty_user_country_code",a):G("chaty_user_country_code")||H("chaty_user_country_code",a,365),w())}):w()),t(window).height()>t(window).width()?t("body").addClass("cht-portrait").removeClass("cht-landscape"):t("body").addClass("cht-landscape").removeClass("cht-portrait"),t(document).on("click","html, body",function(a){t(".form-open").removeClass("form-open"),t(".chaty-outer-forms").removeClass("active"),t(".chaty .chaty-widget.chaty-no-close-button").addClass("chaty-open")}),t(document).on("click",".chaty, .chaty-outer-forms",function(t){t.stopPropagation()}),t(document).on("submit",".whatsapp-chaty-form",function(){if(t(this).hasClass("form-google-analytics")){var a="Whatsapp";if(window.hasOwnProperty("gtag")&>ag("event","chaty_"+a,{eventCategory:"chaty_"+a,event_action:"chaty_"+a,method:"chaty_"+a}),window.hasOwnProperty("ga")){var e=window.ga.getAll()[0];e&&e.send("event","click",{eventCategory:"chaty_"+a,eventAction:"chaty_"+a,method:"chaty_"+a})}}var c=t(this).data("widget"),n=t(this).data("channel"),i=D(c,"c-"+n);if((!z(c)||0==c)&&i){O(c,"c-"+n);var o=t("#chaty-widget-"+c).data("nonce");h||t.ajax({url:chaty_settings.ajax_url,data:{widgetId:c,userId:c,isMobile:s,channel:n,nonce:o,action:"update_chaty_channel_click"},method:"post"})}t("#chaty-widget-"+c).length&&(t("#chaty-widget-"+c).removeClass("form-open"),t(this).closest(".chaty-outer-forms").removeClass("active"),t("#chaty-widget-"+c).find(".chaty-widget").hasClass("cssas-no-close-button")&&t("#chaty-widget-"+c).find(".chaty-widget").addClass("chaty-open"))}),t(document).on("click",".chaty-close-button, .chaty-close-agent-list",function(a){a.preventDefault(),a.stopPropagation();var e=t(this).closest(".chaty-outer-forms").data("widget");if((!z(e)||0==e)&&(t("#chaty-widget-"+e).length&&(t("#chaty-widget-"+e).removeClass("form-open"),t(this).closest(".chaty-outer-forms").removeClass("active"),t("#chaty-widget-"+e).find(".chaty-widget").hasClass("chaty-no-close-button")&&t("#chaty-widget-"+e).find(".chaty-widget").addClass("chaty-open")),t(this).closest(".chaty-whatsapp-form").length)){var c=t(this).closest(".chaty-outer-forms").data("channel");!z(c)&&D(e,"c-"+c)&&O(e,"c-"+c),D(e,"v-widget")&&_(e)}}),t(document).on("click","a.chaty-qr-code-form",function(a){a.preventDefault();var e=t(this).data("form");if(!z(e)&&t("#"+e).length){var c=t(this).html();t("#"+e).hasClass("active")?(t(this).closest(".chaty-widget").addClass("chaty-open"),t(this).closest(".chaty").removeClass("form-open"),t("#"+e).removeClass("active")):(t(this).closest(".chaty-widget").removeClass("chaty-open"),t(this).closest(".chaty").addClass("form-open"),t("#"+e).addClass("active"),t(this).closest(".chaty-widget").find(".open-chaty-channel").html(c))}}),t(document).on("click","a.chaty-contact-us-form",function(a){a.preventDefault();var e=t(this).data("form");if(!z(e)&&t("#"+e).length){var c=t(this).html();t("#"+e).hasClass("active")?(t(this).closest(".chaty-widget").addClass("chaty-open"),t(this).closest(".chaty").removeClass("form-open"),t("#"+e).removeClass("active")):(t(this).closest(".chaty-widget").removeClass("chaty-open"),t(this).closest(".chaty").addClass("form-open"),t("#"+e).addClass("active"),t("#"+e).find(".chaty-ajax-success-message").remove(),t("#"+e).find(".chaty-ajax-error-message").remove(),t("#"+e).find(".has-chaty-error").removeClass("has-chaty-error"),t(this).closest(".chaty-widget").find(".open-chaty-channel").html(c))}}),t(document).on("click","a.chaty-whatsapp-form",function(a){a.preventDefault();var e=t(this).data("form");if(!z(e)&&t("#"+e).length){var c=t(this).html();t("#"+e).addClass("is-active"),t("#"+e).hasClass("active")?(t(this).closest(".chaty-widget").addClass("chaty-open"),t(this).closest(".chaty").removeClass("form-open"),t("#"+e).removeClass("active")):(t(this).closest(".chaty-widget").removeClass("chaty-open"),t(this).closest(".chaty").addClass("form-open"),t("#"+e).addClass("active"),t(this).closest(".chaty-widget").find(".open-chaty-channel").html(c))}}),t(document).on("click",".chaty-channel.chaty-agent-button",function(a){a.preventDefault();var e=t(this).data("form");if(!z(e)&&t("#"+e).length){if(t(this).closest(".chaty-widget").hasClass("has-single")){if(t(this).closest(".chaty").hasClass("form-open"))t(this).closest(".chaty-widget").addClass("chaty-open"),t(this).closest(".chaty").removeClass("form-open"),t("#"+e).removeClass("active");else{var c=t(this).html();t("#"+e).addClass("is-active"),t(this).closest(".chaty-widget").removeClass("chaty-open"),t(this).closest(".chaty").addClass("form-open"),t("#"+e).addClass("active"),t(this).closest(".chaty-widget").find(".open-chaty-channel").html(c)}}else{var c=t(this).html();t("#"+e).addClass("is-active"),t(this).closest(".chaty-widget").removeClass("chaty-open"),t(this).closest(".chaty").addClass("form-open"),t("#"+e).addClass("active"),t(this).closest(".chaty-widget").find(".open-chaty-channel").html(c)}}}),t(document).on("click",".chaty-channel.has-gae",function(e){e.stopPropagation();var c=t(this).data("channel");if(c!==a&&""!=c&&null!=c&&(window.hasOwnProperty("gtag")&>ag("event","chaty_"+c,{eventCategory:"chaty_"+c,event_action:"chaty_"+c,method:"chaty_"+c}),window.hasOwnProperty("ga"))){var n=window.ga.getAll()[0];n&&n.send("event","click",{eventCategory:"chaty_"+c,eventAction:"chaty_"+c,method:"chaty_"+c})}}),t(document).on("click",".chaty-i-trigger:not(.single-channel)",function(){t(this).closest(".chaty").hasClass("form-open")?(t(this).closest(".chaty").removeClass("form-open"),t(this).closest(".chaty-widget").addClass("chaty-open")):t(this).closest(".chaty-widget").toggleClass("chaty-open"),t(".chaty-outer-forms").removeClass("active"),t(this).closest(".chaty").find(".chaty-widget").hasClass("chaty-no-close-button")&&t(this).closest(".chaty").find(".chaty-widget").addClass("chaty-open")}),s||t(document).on("mouseover","body:not(.chaty-in-mobile) .chaty.open-on-hover .chaty-i-trigger:not(.single-channel)",function(){t(this).closest(".chaty-widget").hasClass("chaty-open")||t(this).closest(".chaty-widget").hasClass("on-chaty-widget")||(t(this).closest(".chaty-widget").addClass("on-chaty-widget"),t(this).find(".chaty-cta-main").trigger("click"))}).on("mouseleave","body:not(.chaty-in-mobile) .chaty.open-on-hover .chaty-i-trigger:not(.single-channel)",function(){t(this).closest(".chaty-widget").hasClass("chaty-open")||t(this).closest(".chaty-widget").removeClass("on-chaty-widget")}),t(document).on("click",".chaty-channel.single a",function(){if(t(this).closest(".chaty").hasClass("first_click")){var a=t(this).closest(".chaty").data("id");O(a,"c-widget"),t(this).closest(".chaty-channel").removeClass("active")}}),t(document).on("click",".chaty-channel",function(a){var e,c,n,i=[],o=0,l=t(this).closest(".chaty").data("id");if(void 0!==l&&void 0!==(n=t("#chaty-widget-"+l).data("identifier"))){var r=t("#chaty-widget-"+l).data("user");if(v(l),t(this).hasClass("chaty-cta-main")||t(this).hasClass("chaty-cta-close")){if(e=D(l,"c-widget"),t("#chaty-widget-"+l).find(".ch-pending-msg").remove(),e&&(O(l,"c-widget"),t(this).hasClass("chaty-cta-main"))){i=[],t("#chaty-widget-"+l+" .chaty-channel-list").find(".chaty-channel").each(function(){c=t(this).data("channel"),(e=D(l,"v-"+c))&&void 0!==c&&(O(l,"v-"+c),i.push(c))});var d=t("#chaty-widget-"+l).data("nonce");h||t.ajax({url:chaty_settings.ajax_url,data:{widgetId:l,userId:r,isMobile:s,channels:i,isSingle:0,nonce:d,action:"update_chaty_widget_click"},method:"post"})}t("#chaty-widget-"+l).hasClass("first_click")&&(t("#chaty-widget-"+l+" .chaty-cta-main").removeClass("active"),t("#chaty-widget-"+l+" .chaty-cta-main").removeClass("chaty-tooltip"))}else if(t(this).hasClass("single")){t("#chaty-widget-"+l).find(".ch-pending-msg").remove(),e=D(l,"c-widget");var d=t("#chaty-widget-"+l).data("nonce");e&&(O(l,"c-widget"),o=0,i=[],c=t(this).data("channel"),(e=D(l,"c-"+c))&&(i.push(c),o=1),h||t.ajax({url:chaty_settings.ajax_url,data:{widgetId:l,userId:r,isMobile:s,channels:i,isSingle:o,nonce:d,action:"update_chaty_widget_click"},method:"post"})),t("#chaty-widget-"+l).hasClass("first_click")&&(t("#chaty-widget-"+l+" .chaty-tooltip").removeClass("chaty-tooltip"),t("#chaty-widget-"+l+" .single-channel a").addClass("chaty-tooltip"))}else if(t(this).hasClass("chaty-channel")&&(c=t(this).data("channel"),e=D(l,"c-"+c))){O(l,"c-"+c);var d=t("#chaty-widget-"+l).data("nonce");h||t.ajax({url:chaty_settings.ajax_url,data:{widgetId:l,userId:r,isMobile:s,channel:c,nonce:d,action:"update_chaty_channel_click"},method:"post"})}}}),t(document).on("submit",".chaty-ajax-contact-form",function(a){a.preventDefault();var e=0;if(t(this).find(".has-chaty-error").each(function(){t(this).removeClass("has-chaty-error")}),t(this).find(".chaty-error-msg").remove(),t(this).find(".chaty-ajax-error-message").remove(),t(this).find(".chaty-ajax-success-message").remove(),t(this).find(".is-required").each(function(){""==jQuery.trim(t(this).val())&&(e++,t(this).addClass("has-chaty-error"))}),0==e){var c=t(this);t(".chaty-contact-submit-btn").attr("disabled",!0),jQuery.ajax({url:chaty_settings.ajax_url,data:{action:"chaty_front_form_save_data",name:c.find(".field-name").length?c.find(".field-name").val():"",email:c.find(".field-email").length?c.find(".field-email").val():"",phone:c.find(".field-phone").length?c.find(".field-phone").val():"",message:c.find(".field-message").length?c.find(".field-message").val():"",nonce:c.data("token"),channel:c.data("channel"),widget:c.data("index"),ref_url:window.location.href},type:"post",async:!0,defer:!0,success:function(a){if(a=jQuery.parseJSON(a),t(".chaty-ajax-error-message").remove(),t(".chaty-ajax-success-message").remove(),t(".chaty-contact-submit-btn").attr("disabled",!1),1==a.status)t(".chaty-contact-inputs").append("
"+a.message+"
"),t(".field-name, .field-email, .field-message, .field-phone").val(""),"yes"==a.redirect_action&&("yes"==a.link_in_new_tab?window.open(a.redirect_link,"_blank"):window.location=a.redirect_link),"yes"==a.close_form_after&&setTimeout(function(){if(t(".chaty-outer-forms.active").length){var a=t(".chaty-outer-forms.active").data("widget");(!z(a)||0==a)&&t("#chaty-widget-"+a).length&&(t("#chaty-widget-"+a).removeClass("form-open"),t(".chaty-outer-forms.active").removeClass("active"),t("#chaty-widget-"+a).find(".chaty-widget").hasClass("chaty-no-close-button")&&t("#chaty-widget-"+a).find(".chaty-widget").addClass("chaty-open"))}},1e3*parseInt(a.close_form_after_seconds));else if(1==a.error){if(a.errors.length)for(var e=0;e"+a.errors[e].message+"")}else t(".chaty-contact-inputs").append("
"+a.message+"
")}})}else t(".has-chaty-error:first").focus();return!1}),t(document).on("click",".chaty-widget.has-single .chaty-i-trigger .chaty-channel:not(.chaty-agent-button).Phone-channel",function(){window.location=t(this).find("a").prop("href")}),t(document).on("click",".chaty-widget.has-single .chaty-i-trigger .chaty-channel:not(.chaty-agent-button).Phone-channel a",function(t){t.stopPropagation(),t.stopImmediatePropagation()})}),t(window).resize(function(){t(window).height()>t(window).width()?t("body").addClass("cht-portrait").removeClass("cht-landscape"):t("body").addClass("cht-landscape").removeClass("cht-portrait")})}); // source --> https://www.inflexmedia.com/wp-content/plugins/wen-skill-charts/public/js/jquery.appear.js?ver=1.5 /* * jQuery appear plugin * * Copyright (c) 2012 Andrey Sidorov * licensed under MIT license. * * https://github.com/morr/jquery.appear/ * * Version: 0.3.4 */ (function($) { var selectors = []; var check_binded = false; var check_lock = false; var defaults = { interval: 250, force_process: false } var $window = $(window); var $prior_appeared; function process() { check_lock = false; for (var index = 0, selectorsLength = selectors.length; index < selectorsLength; index++) { var $appeared = $(selectors[index]).filter(function() { return $(this).is(':appeared'); }); $appeared.trigger('appear', [$appeared]); if ($prior_appeared) { var $disappeared = $prior_appeared.not($appeared); $disappeared.trigger('disappear', [$disappeared]); } $prior_appeared = $appeared; } } // "appeared" custom filter $.expr[':']['appeared'] = function(element) { var $element = $(element); if (!$element.is(':visible')) { return false; } var window_left = $window.scrollLeft(); var window_top = $window.scrollTop(); var offset = $element.offset(); var left = offset.left; var top = offset.top; if (top + $element.height() >= window_top && top - ($element.data('appear-top-offset') || 0) <= window_top + $window.height() && left + $element.width() >= window_left && left - ($element.data('appear-left-offset') || 0) <= window_left + $window.width()) { return true; } else { return false; } } $.fn.extend({ // watching for element's appearance in browser viewport appear: function(options) { var opts = $.extend({}, defaults, options || {}); var selector = this.selector || this; if (!check_binded) { var on_check = function() { if (check_lock) { return; } check_lock = true; setTimeout(process, opts.interval); }; $(window).scroll(on_check).resize(on_check); check_binded = true; } if (opts.force_process) { setTimeout(process, opts.interval); } selectors.push(selector); return $(selector); } }); $.extend({ // force elements's appearance check force_appear: function() { if (check_binded) { process(); return true; }; return false; } }); })(jQuery); // source --> https://www.inflexmedia.com/wp-content/plugins/wen-skill-charts/public/js/jquery.easypiechart.js?ver=1.5 /**! * easyPieChart * Lightweight plugin to render simple, animated and retina optimized pie charts * * @license * @author Robert Fleischmann (http://robert-fleischmann.de) * @version 2.1.6 **/ (function(root, factory) { if(typeof exports === 'object') { module.exports = factory(require('jquery')); } else if(typeof define === 'function' && define.amd) { define(['jquery'], factory); } else { factory(root.jQuery); } }(this, function($) { /** * Renderer to render the chart on a canvas object * @param {DOMElement} el DOM element to host the canvas (root of the plugin) * @param {object} options options object of the plugin */ var CanvasRenderer = function(el, options) { var cachedBackground; var canvas = document.createElement('canvas'); el.appendChild(canvas); if (typeof(G_vmlCanvasManager) !== 'undefined') { G_vmlCanvasManager.initElement(canvas); } var ctx = canvas.getContext('2d'); canvas.width = canvas.height = options.size; // canvas on retina devices var scaleBy = 1; if (window.devicePixelRatio > 1) { scaleBy = window.devicePixelRatio; canvas.style.width = canvas.style.height = [options.size, 'px'].join(''); canvas.width = canvas.height = options.size * scaleBy; ctx.scale(scaleBy, scaleBy); } // move 0,0 coordinates to the center ctx.translate(options.size / 2, options.size / 2); // rotate canvas -90deg ctx.rotate((-1 / 2 + options.rotate / 180) * Math.PI); var radius = (options.size - options.lineWidth) / 2; if (options.scaleColor && options.scaleLength) { radius -= options.scaleLength + 2; // 2 is the distance between scale and bar } // IE polyfill for Date Date.now = Date.now || function() { return +(new Date()); }; /** * Draw a circle around the center of the canvas * @param {strong} color Valid CSS color string * @param {number} lineWidth Width of the line in px * @param {number} percent Percentage to draw (float between -1 and 1) */ var drawCircle = function(color, lineWidth, percent) { percent = Math.min(Math.max(-1, percent || 0), 1); var isNegative = percent <= 0 ? true : false; ctx.beginPath(); ctx.arc(0, 0, radius, 0, Math.PI * 2 * percent, isNegative); ctx.strokeStyle = color; ctx.lineWidth = lineWidth; ctx.stroke(); }; /** * Draw the scale of the chart */ var drawScale = function() { var offset; var length; ctx.lineWidth = 1; ctx.fillStyle = options.scaleColor; ctx.save(); for (var i = 24; i > 0; --i) { if (i % 6 === 0) { length = options.scaleLength; offset = 0; } else { length = options.scaleLength * 0.6; offset = options.scaleLength - length; } ctx.fillRect(-options.size/2 + offset, 0, length, 1); ctx.rotate(Math.PI / 12); } ctx.restore(); }; /** * Request animation frame wrapper with polyfill * @return {function} Request animation frame method or timeout fallback */ var reqAnimationFrame = (function() { return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || function(callback) { window.setTimeout(callback, 1000 / 60); }; }()); /** * Draw the background of the plugin including the scale and the track */ var drawBackground = function() { if(options.scaleColor) drawScale(); if(options.trackColor) drawCircle(options.trackColor, options.trackWidth || options.lineWidth, 1); }; /** * Canvas accessor */ this.getCanvas = function() { return canvas; }; /** * Canvas 2D context 'ctx' accessor */ this.getCtx = function() { return ctx; }; /** * Clear the complete canvas */ this.clear = function() { ctx.clearRect(options.size / -2, options.size / -2, options.size, options.size); }; /** * Draw the complete chart * @param {number} percent Percent shown by the chart between -100 and 100 */ this.draw = function(percent) { // do we need to render a background if (!!options.scaleColor || !!options.trackColor) { // getImageData and putImageData are supported if (ctx.getImageData && ctx.putImageData) { if (!cachedBackground) { drawBackground(); cachedBackground = ctx.getImageData(0, 0, options.size * scaleBy, options.size * scaleBy); } else { ctx.putImageData(cachedBackground, 0, 0); } } else { this.clear(); drawBackground(); } } else { this.clear(); } ctx.lineCap = options.lineCap; // if barcolor is a function execute it and pass the percent as a value var color; if (typeof(options.barColor) === 'function') { color = options.barColor(percent); } else { color = options.barColor; } // draw bar drawCircle(color, options.lineWidth, percent / 100); }.bind(this); /** * Animate from some percent to some other percentage * @param {number} from Starting percentage * @param {number} to Final percentage */ this.animate = function(from, to) { var startTime = Date.now(); options.onStart(from, to); var animation = function() { var process = Math.min(Date.now() - startTime, options.animate.duration); var currentValue = options.easing(this, process, from, to - from, options.animate.duration); this.draw(currentValue); options.onStep(from, to, currentValue); if (process >= options.animate.duration) { options.onStop(from, to); } else { reqAnimationFrame(animation); } }.bind(this); reqAnimationFrame(animation); }.bind(this); }; var EasyPieChart = function(el, opts) { var defaultOptions = { barColor: '#ef1e25', trackColor: '#f9f9f9', scaleColor: '#dfe0e0', scaleLength: 5, lineCap: 'round', lineWidth: 3, trackWidth: undefined, size: 110, rotate: 0, animate: { duration: 1000, enabled: true }, easing: function (x, t, b, c, d) { // more can be found here: http://gsgd.co.uk/sandbox/jquery/easing/ t = t / (d/2); if (t < 1) { return c / 2 * t * t + b; } return -c/2 * ((--t)*(t-2) - 1) + b; }, onStart: function(from, to) { return; }, onStep: function(from, to, currentValue) { return; }, onStop: function(from, to) { return; } }; // detect present renderer if (typeof(CanvasRenderer) !== 'undefined') { defaultOptions.renderer = CanvasRenderer; } else if (typeof(SVGRenderer) !== 'undefined') { defaultOptions.renderer = SVGRenderer; } else { throw new Error('Please load either the SVG- or the CanvasRenderer'); } var options = {}; var currentValue = 0; /** * Initialize the plugin by creating the options object and initialize rendering */ var init = function() { this.el = el; this.options = options; // merge user options into default options for (var i in defaultOptions) { if (defaultOptions.hasOwnProperty(i)) { options[i] = opts && typeof(opts[i]) !== 'undefined' ? opts[i] : defaultOptions[i]; if (typeof(options[i]) === 'function') { options[i] = options[i].bind(this); } } } // check for jQuery easing if (typeof(options.easing) === 'string' && typeof(jQuery) !== 'undefined' && jQuery.isFunction(jQuery.easing[options.easing])) { options.easing = jQuery.easing[options.easing]; } else { options.easing = defaultOptions.easing; } // process earlier animate option to avoid bc breaks if (typeof(options.animate) === 'number') { options.animate = { duration: options.animate, enabled: true }; } if (typeof(options.animate) === 'boolean' && !options.animate) { options.animate = { duration: 1000, enabled: options.animate }; } // create renderer this.renderer = new options.renderer(el, options); // initial draw this.renderer.draw(currentValue); // initial update if (el.dataset && el.dataset.percent) { this.update(parseFloat(el.dataset.percent)); } else if (el.getAttribute && el.getAttribute('data-percent')) { this.update(parseFloat(el.getAttribute('data-percent'))); } }.bind(this); /** * Update the value of the chart * @param {number} newValue Number between 0 and 100 * @return {object} Instance of the plugin for method chaining */ this.update = function(newValue) { newValue = parseFloat(newValue); if (options.animate.enabled) { this.renderer.animate(currentValue, newValue); } else { this.renderer.draw(newValue); } currentValue = newValue; return this; }.bind(this); /** * Disable animation * @return {object} Instance of the plugin for method chaining */ this.disableAnimation = function() { options.animate.enabled = false; return this; }; /** * Enable animation * @return {object} Instance of the plugin for method chaining */ this.enableAnimation = function() { options.animate.enabled = true; return this; }; init(); }; $.fn.easyPieChart = function(options) { return this.each(function() { var instanceOptions; if (!$.data(this, 'easyPieChart')) { instanceOptions = $.extend({}, options, $(this).data()); console.log(instanceOptions); $.data(this, 'easyPieChart', new EasyPieChart(this, instanceOptions)); } }); }; })); // source --> https://www.inflexmedia.com/wp-content/plugins/wen-skill-charts/public/js/wen-skill-charts-public.js?ver=1.5 function wen_skill_bar_animate(my_obj){ if( 1 == jQuery( my_obj ).data('animated') ){ return; } jQuery('.skill-bar-wrap', my_obj).each(function(){ jQuery(this).find('.skill-bar').animate({ width:jQuery(this).attr('data-percent') },2000, function(){ //after animation is complete jQuery( my_obj ).data('animated','1'); }); }); } //end function (function( $ ) { 'use strict'; })( jQuery );